const express = require('express')
const router = express.Router()

const cors = require('../middleware/cors')

const Util = require('../util')
const util = new Util()

router.all('*', cors)

router.get('/', (req, res) => {
  res.json({ code: 1, msg: '服务运行中...' })
})

router.use((req, res, next) => {
  util.jsonRes(res, res.preRes)
})

module.exports = router
